package com.atguigu.day20.homework.h2;

import java.util.TreeSet;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/25 19:37
 * @注释
 */
public class Test {
    public static void main(String[] args) {
        Number01 num01 = new Number01();
        new Thread() {
            @Override
            public void run() {
                while (true) {
                    num01.printOddNum();
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
        }.start();

        new Thread() {
            @Override
            public void run() {
                while (true) {
                    num01.printEvenNum();
                }
            }
        }.start();
    }
}
